﻿define(["service/service", "service/httpService"], function (service) {
    service.factory("roleService", function (httpService) {
        var methods = {
			"get": function (params) {
				return httpService.get("/admin/manage/getrole", params);
			},
			"gets": function (params) {
				return httpService.get("/admin/manage/getroles", params);
			},
			"role_menus": function (params) {
                return httpService.get("/common/role_menus", params);
			},
			"put": function (params) {
				return httpService.put("/admin/manage/putrole", params);
			},
			"post": function (params) {
				return httpService.post("/admin/manage/postrole", params);
			},
			"delete": function (id) {
				return httpService.delete("/admin/manage/deleterole/" + id);
			}
        }
        return methods;
    });
});